﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Paradox.Models.Story>>" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="Paradox.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Paradox Designs - News
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% Paradox.Helpers.Tools h = new Tools();%>
    <script src="../../Scripts/twitter/jquery.juitter.js" type="text/javascript"></script>
    <script src="../../Scripts/twitter/twitter.js" type="text/javascript"></script>
    <div class="newsFeed">
        <h2>
            News
        </h2>
        <div class="twitter" id="twitter_container">
            <div id="twitter_header">
                <img alt="twitter" src="../../Content/Images/ui_images/twitter.png" style="width: 125px;" />
            </div>
            
            <div id="twitterlinks">
                <a href="http://twitter.com/paradoxweb">Follow us on Twitter</a>
            </div>
            
            <div id="twitter_feed">
            </div>
            
        </div>
        <ul class="storyListWrapper" >
            <% foreach (var item in Model)
               { %>
            <li>
                <div class="storyWrapper">
                    <h2 id="storyTitle">
                        <%= Html.ActionLink(item.title, item.id.ToString(), "Story")%>
                    </h2>
                    <p id="storySubTitle">
                        Posted
                        <%= Html.Encode(String.Format("{0:d}", item.posted_on)) %>
                        By:
                        <%= Html.Encode(item.Author) %></p>
                </div>
                <div class="storyBody" >
                    <%= h.Trim(item.StoryText, 800)%>
                    <%= Html.ActionLink("... Full Story", item.id.ToString(), "Story/Index")%>
                </div>
            </li>
            <% } %>
        </ul>
    </div>
</asp:Content>
